//市场相关接口

import { get, post } from '../../util/http.js'
export default {
    //获取圈子列表详情
    checkLogin(uid) {
        return post('http://dhapi3.rz158.com//webViewDitails/checkIsLogin', {
            uid: uid
        })
    },
    //获取每日听书列表
    getListen(type) {
        return post('http://dhapi3.rz158.com/mindCategory/getAllMindCategoryV3', {
            type: type
        })
    },
    //获取圈子列表
    getCircleList(type, page) {
        return post('http://dlsapi.rz158.com/circle/circleList', {
            type: type,
            page: page,
            pageSize: 10
        })
    },
    //获取圈子详情
    getCircleDetail(obj) {
        return post('http://dhapi3.rz158.com/webViewDitails/selectCircleDetailsV3_2', obj)
    },

    /**
     * 获得圈主分享详情
     */
    getCircleTopicList(obj) {
        return post('http://dhapi3.rz158.com/webViewDitails/selectCircleTopicListV1_0', obj)
    },

    selectListByQueryMain(obj) {
        return post('http://dhapi3.rz158.com/webViewDitails/selectListByQueryMain', obj)
    },
    //进入确认订单页付款获取折扣和剩余金额
    confirmInfo(obj) {
        return post('http://dlsapi.rz158.com/agent/confirmInfo', obj)
    },
    selectCircleTopicListV() {

    },
    //购买席位
    buyCircle(obj) {
        return post('http://dlsapi.rz158.com/circle/buySeat', obj)
    },
    buyUserCircle(obj) {
        return post('http://dhapi3.rz158.com/webViewDitails/buySeat', obj)
    },
    //vipcard
    getcardInfo(agentId) {
        return post('http://dlsapi.rz158.com/order/cardInfo', {
            agentId: agentId
        })
    },
    addOrder(obj) {
        return post('http://dlsapi.rz158.com/order/addOrder', obj)
    },
    getMicroInfo(type) {
        //https://www.easy-mock.com/mock/5b8a80cc6154f45c137d9634
        //http://dhapi3.rz158.com
        return post('http://dhapi3.rz158.com/mindCategory/getAllMindCategory', {
            type: type
        })
    },
    //获取专栏课程列表
    selectListByQuery(obj) {
        return post('http://dhapi3.rz158.com/mindMain/selectListByQuery', obj)
    },
    //获取课程详情
    getMindDetail(id) {
        return post('http://dhapi3.rz158.com/mindDetail/getMindDetailById', {
            id: id
        })
    },
    //获取课程评论列表
    getComments(id, num1, num2) {
        return post('http://dhapi3.rz158.com/mindComments/selectComments', {
            detailId: id,
            page: num1,
            pagesize: num2
        })
    },
    //音频列表    
    getMicroDetail(obj) {
        return post('http://dhapi3.rz158.com/mindMain/getMindMainById', obj)
    },
    //
    getCourseList(obj) {
        return post('http://dhapi3.rz158.com/mindDetail/selectListByQuery', obj)
    },
    //音频详情
    getAudioDetail(id) {
        return get('/mindDetail/getMindDetailById', {
            params: {
                id: id
            }
        })
    },
    searchCircle(word) {
        return post('http://dlsapi.rz158.com/search/circleList', {
            word: word
        })
    },
    searchInfo(word, type) {
        return post('http://dlsapi.rz158.com/search/courseList', {
            word: word,
            type: type
        })
    },
    buyMicro(obj) {
        return post('http://dhapi3.rz158.com/webViewDitails/buyMind', obj)
    },

    buyListen(obj) {
        return post('http://dhapi3.rz158.com/webViewDitails/buyBook', obj)
    },
    getPoster(obj) {
        return post('http://dlsapi.rz158.com/poster/getPoster', obj)
    },
    getPosterTemplate(obj) {
        return post('http://dlsapi.rz158.com/poster/getPosterTemplate', obj)
    },
    getUserAccount(obj) {
        return post('http://dlsapi.rz158.com/user/getUserAccount', obj)
    },
    payWechat(obj) {
        return post('http://dlsapi.rz158.com/thirdPay/pay', obj)
    },
    wechatSuccess() {
        return post('http://dlsapi.rz158.com/thirdPay/tenNotify')
    },
    sureOrder(obj) {
        return post('http://dlsapi.rz158.com/order/confirmOrder', obj)
    }
}